package com.jcfk.eam.util.enums;

import com.jcfk.eam.util.bean.codeGenerator.BomCodeGenerator;
import com.jcfk.eam.util.bean.codeGenerator.CodeGenerator;
import com.jcfk.eam.util.bean.codeGenerator.MouldCodeGenerator;

public enum CodeGeneratorEnu {

    BOM_CODE("模具Bom编码", new BomCodeGenerator()),
    MOULD_CODE("模具组装编码", new MouldCodeGenerator());

    private final String desc;

    private final CodeGenerator codeGenerator;

    CodeGeneratorEnu(String desc,CodeGenerator codeGenerator) {
        this.desc = desc;
        this.codeGenerator = codeGenerator;
    }

    public String build() {
        return codeGenerator.build();
    }
}
